package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TimePeriodMapper;
import com.ruoyi.system.domain.TimePeriod;
import com.ruoyi.system.service.ITimePeriodService;

import javax.annotation.Resource;

/**
 * 时间段Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-26
 */
@Service
public class TimePeriodServiceImpl implements ITimePeriodService 
{
    @Resource
    private TimePeriodMapper timePeriodMapper;

    /**
     * 查询时间段
     * 
     * @param id 时间段主键
     * @return 时间段
     */
    @Override
    public TimePeriod selectTimePeriodById(Long id)
    {
        return timePeriodMapper.selectTimePeriodById(id);
    }

    /**
     * 查询时间段列表
     * 
     * @param timePeriod 时间段
     * @return 时间段
     */
    @Override
    public List<TimePeriod> selectTimePeriodList(TimePeriod timePeriod)
    {
        return timePeriodMapper.selectTimePeriodList(timePeriod);
    }

    /**
     * 新增时间段
     * 
     * @param timePeriod 时间段
     * @return 结果
     */
    @Override
    public int insertTimePeriod(TimePeriod timePeriod)
    {
        return timePeriodMapper.insertTimePeriod(timePeriod);
    }

    /**
     * 修改时间段
     * 
     * @param timePeriod 时间段
     * @return 结果
     */
    @Override
    public int updateTimePeriod(TimePeriod timePeriod)
    {
        return timePeriodMapper.updateTimePeriod(timePeriod);
    }

    /**
     * 批量删除时间段
     * 
     * @param ids 需要删除的时间段主键
     * @return 结果
     */
    @Override
    public int deleteTimePeriodByIds(Long[] ids)
    {
        return timePeriodMapper.deleteTimePeriodByIds(ids);
    }

    /**
     * 删除时间段信息
     * 
     * @param id 时间段主键
     * @return 结果
     */
    @Override
    public int deleteTimePeriodById(Long id)
    {
        return timePeriodMapper.deleteTimePeriodById(id);
    }

    @Override
    public List<TimePeriod> selectAll() {
        return timePeriodMapper.selectAll();
    }
}
